package jm.mq.bootconfirm.consumer;

import jm.mq.bootconfirm.conf.BingConf;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.nio.charset.StandardCharsets;

/**
 * @Description 报警消费者
 * @date 2022/3/13 9:36
 */
@Slf4j
@Component
public class WarningConsumer {

    @RabbitListener(queues = BingConf.WARNING_QUEUE)
    public void receiveConfirmMessage(Message message){
        log.info("报警消费者接收到消息：{}",new String(message.getBody(), StandardCharsets.UTF_8));
    }

}
